home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 10
/
The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso
/
PC_SIGCD
/
20
/
9
/
DISK2092.ZIP
/
RBBS-LIT.ZIP
/
LIT
/
MITESIZE.DOC
< prev
next >
Wrap
Text File
|
1990-01-13
|
6KB
|
165 lines
Mite-Size
A Set of Merges to Minimize Code Size
for RBBS 17.3
by Ken Goosens (data line 703-978-6360)
What These Merges Do
These merges allow you select what functions to eliminate
from RBBS in order to reduce the size of the compiled program
and reduce the amount of memory needed.
WARNING!!! These merges must be applied to the UNMODIFIED
source code to RBBS 17.3. The merges substitute code for
code in RBBS, and therefore may destroy other changes you
have made to RBBS. If you have fixes, you may want first to
reduce the code, then add in the fixes.
History of Changes
01-10-90. Lit code rewritten to conform to "periodless" base code.
END SUB written into line containing omitted subroutine
for uniformity, and to save a few extra ASCII bytes.
Most subroutine descriptions and 'SUBTITLEs' removed
when subs .lit-ted out.
08-06-89. Problem fixed when omitting fossil driver.
07-30. Incorporated changes made in 17.2B.
05-22. More variables added. Recommend using BLED 2.2,
since 2.1 had a bug that would cause erroneous warnings.
12-27-88. Corrections to doc. Should only use BLED 2.1.
Variables added. More code removeable.
12-13. Two variables left out of 12-11 release of SETLIT.INC:
DOORRTN, and ASMFREESP. Added.
Three LIT files added: ASMANSI (omits ANSI.OBJ) by using only
Basic screen writes. CONFERENCE (no conferences). And
DOORS (no doors).
Documentation (this file) corrected: base should use is
17.2A, and QB 4.5 added as possible compiler.
01-09 Updated all .LIT files to recognize line numbers at the beginning
of every subroutine. (These were made available in the Base dated
01/09/88.
01-09 Corrected SUB4LIT.MRG to correctly identify NOVIEW.LIT. Also
created the file (NOVIEW.LIT) since it was not in the archive.
01-09 Added reference to DOORS.LIT to RBBSLIT.MRG.
01-09 Added reference to DOORS3.LIT to SUB3LIT.MRG.
01-09 Corrected CORVUS.LIT to use BRKFNAME as was being done in the
original code.
01-09 Created SUB5HDR.LIT so that we are consistant.
01-09 All SUBxHDR.LIT files were updated to identify that it is part
of a MITE SIZE program list.
01-09 Standardized headings of each LIT file.
01-15 Line should have been omitted for PCNET. Doors code reduction
corrected.
01-16 Four new LIT variables added.
Why Code Reduction May be Needed
In the absence of an overlay linker or optimizing compiler for
BASIC, RBBS has gotten steadily larger in code size as new functions
have been added, and will continue to do so rather than not add
new functions. The increase in code size causes a problem on
systems that wish to run 2 nodes within 640K of memory, or
otherwise has only a restricted amount of memory to use.
These merges allow sysops with a supported BASIC compiler to
reduce code size. This is achieved by eliminating the code
for unused functions, redundant code (typically doing the same
thing in both BASIC and assembler), and functions which the
sysop is willing to sacrifice.
RBBS can then continue to grow while still supporting sysops
with limited memory.
How to Apply the Merges
1st, you need a copy of the unmodifed source code for 17.2A.
Put this in a separate subdirectory (e.g. 172A)
2nd, in the subdirectory where you normally recompile RBBS,
copy all the files in this application.
3rd, modify the file MAKELIT.BAT by putting in the drive/path
for the original code (the first parm to BLED). The lines
you should modify all begin with "*$", which is the default
for a BLED metacommand. The lines beginning with "* " are
BLED comments, which are ignored in a merge.
4th, get BLED version 2.2 or higher. The latest is 2.2.
Earlier versions lack the necessary features.
Either put BLED in with the merges or in your
path. The new BLED functions are documented in BLED.DOC.
5th, use your favorite text editor to modify the file
SETLIT.INC. Directions are right in the file. Here is where
you specify what options use are using and which you don't
want. This is the fundamental "driver" used. The typical
way you remove code is by setting a variable to the value
"OFF", e.g. BAUD450 to "OFF" to save code by not supporting
changing 300 baud to 450, or LIBRARY to "OFF" if not using the
Library section.
6th, execute the MAKELIT.BAT, which will generate the code
needed to support your application (a new RBBS-PC.BAS,
RBBSSUB2.BAS, and RBBSSUB3.BAS). The version will say
"17.2A Mite-Sized". You should get no BLED warnings.
7th, recompile. Hint: QB 3 produces the largest code.
QB 2.01 is smaller, and QB 1.02 is the smallest. QB 4.5
works but produces the largest code of all.
Also when removing certain routines it is possible to
further reduce the size of the resulting .EXE file by
removing the associated .OBJ from the link step. i.e.
If you specify MULTNODE = NETBIOS then you can remove
BDRIVEC2.OBJ, PCNET.OBJ, RBBSML.OBJ, 10NET.OBJ and
RBBSDV.OBJ from the link parameters.
Never use the /E option in linking. You should
get no errors when recompiling.
8th, reconfigure RBBS for the reduced code, if needed. For example,
disable the commands for functions you remove, such as taking out
the 'A' command if you turn questionnaires off.
What the Files Mean
SETLIT.INC - An file shared by all merges, which sets the
options the sysop wants and does not want. Basically
defines BLED metavariables.
RBBSLIT.MRG, SUB1LIT.MRG,SUB2LIT.MRG, SUB3LIT.MRG, SUB4LIT.MRG,
SUB5LIT.MRG.
The fundamental BLED merges for rbbs-pc.bas, rbbssub1.bas,
rbbssub2.bas, rbbssub3.bas, rbbssub4.bas and rbbssub5.bas
respectively. Each reads in (includes) SETLIT.INC to set
the metavariables, then uses the values to determines what
merges to process in the run.
*.LIT. Files that reduce the code.
You are welcome to enhance these merges with further code reduction.
Please report any problems to Ken Goosens, data # 703-978-6360.
Realize that there is no way I can test the many different
environments or all the combinations of choices.